package com.summo.demo.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.summo.demo.model.AddReq;
import com.summo.demo.model.UpdateReq;
import org.springframework.http.ResponseEntity;

public interface UserService {

    /**
     * 用户登录
     *
     * @param userName            用户名称
     * @param httpServletRequest  request
     * @param httpServletResponse response
     * @return 是否登录成功
     */
    ResponseEntity<String> login(String userName, HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse);

    /**
     * 添加用户
     *
     * @param addReq 参数
     * @return 添加结果
     */
    ResponseEntity<String> add(AddReq addReq);

    /**
     * 删除用户
     *
     * @param userId 用户ID
     * @return 删除结果
     */
    ResponseEntity<String> delete(Long userId);

    /**
     * 查询用户
     *
     * @param userName 用户名称
     * @return 用户信息
     */
    ResponseEntity<String> query(String userName);

    /**
     * 更新用户
     * @param updateReq 参数
     * @return 更新结果
     */
    ResponseEntity<String> update(UpdateReq updateReq);

}
